package com.example.dirviesystem.coach.service;

import com.example.dirviesystem.entity.CoachInfo;
import com.example.dirviesystem.repository.CoachInfoRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CoachInfoService {

    @Autowired
    private CoachInfoRepository coachInfoRepository;

    public CoachInfo save(CoachInfo coachInfo) {
        return coachInfoRepository.save(coachInfo);
    }

    public CoachInfo findById(Long id) {
        return coachInfoRepository.findById(id).orElse(null);
    }
}